home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / pull20.zip / PULLDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1988-01-11  |  2KB  |  58 lines

  1. { =========================================================================== }
  2. { PullDemo.pas - Full demonstration of pull-down menus.     ver 2.0, 01-12-87 }
  3. {                                                                             }
  4. { (c) 1987,1988 James H. LeMay                                                }
  5. { =========================================================================== }
  6.  
  7. {$R-,S+,I+,D+,T-,F-,V-,B-,N-,L+ }
  8. {$M 16384,10000,10000 }
  9.  
  10. program PullDemo;
  11.  
  12. uses
  13.   CRT,Qwik,WndwVars,Wndw,PullVars,Pull,PullProc,PullWork;
  14.  
  15. procedure DisplayScreen;
  16. begin
  17.   Qwrite (1,1,lightgray,'PULLDEMO v2.0             Multi-level Pu'+
  18.                         'll-down Menus        (c) 1988  J H LeMay');
  19.   ShowTopMenu;
  20.   SetWindowModes (PermMode);
  21.   MakeWindow (3,1,CRTrows-3,CRTcols,white+BlueBG,lightgray+BlackBG,DoubleBrdr,
  22.               Window1);
  23.   SetWindowModes (0);
  24.   with TopWndwStat do
  25.     begin
  26.       QwriteC ( 7,WScol,WScol2,-1,'PULL20.ARC - MULTI-LEVEL PULL-DOWN MENUS');
  27.       QwriteC (11,WScol,WScol2,-1,'Use F1 everywhere for some descriptions.');
  28.       QwriteC (12,WScol,WScol2,-1,'Use ''Quit'' to exit demo program.');
  29.       QwriteC (13,WScol,WScol2,-1,'Be sure to try a CR at "≡" marked lines.');
  30.       QwriteC (14,WScol,WScol2,-1,'Also try all the EnterData lines.');
  31.       QwriteC (16,WScol,WScol2,yellow+BlueBG,'This is Work Window 1.');
  32.       Qfill   (19,46,1,4,yellow+MagentaBG,' ');
  33.       GotoRC  (WSrow+17,WScol+26)
  34.     end
  35. end;
  36.  
  37. { *****************************    STEP 9   ********************************* }
  38. { It's all yours from here: }
  39. begin
  40.   GetDir (0,OrigPathName);
  41.   PathName:=OrigPathName;
  42.   InitPull (lightgray,false);       { <<-- Be sure you do this!! }
  43.   DisplayScreen;
  44.   WorkWndwStep:=0;            { Step number of where you want to start in the
  45.                                 Work window. }
  46.   { Character set for DOS file names: }
  47.   FileNameCharSet:= ['!'..')','-'..'9','@'..'~',BSKey,NullKey]
  48.                     - ['"','/','['..']','|'];
  49.   GotoKeyDispatcher;          { <<-- All keyboard entries go through here! }
  50.   if OrigPathName<>PathName then
  51.     begin
  52.       {$I-} ChDir(OrigPathName); {$I+}
  53.       if IOresult<>0 then OrigPathName:=PathName;
  54.     end;
  55.   Qfill (1,1,CRTrows,CRTcols,InitAttr,' ');
  56.   GotoRC (CRTrows,1);
  57. end.
  58.